package tokens

type TOKENS string

const IntLiteral TOKENS = "INT"
const DoubleLiteral TOKENS = "DBL"
const ADD TOKENS = "ADD"
const SUB TOKENS = "SUB"
const MUL TOKENS = "MUL"
const DIV TOKENS = "DIV"
const LB TOKENS = "LB"
const RB TOKENS = "RB"
const UNKNOWN TOKENS = "UNKNOWN"

type Token struct {
	Token TOKENS
	Value string
	Position int
}



func OfRune(t TOKENS, r rune, from int)  *Token {
	return &Token {
		Token: t,
		Value : string(r),
		Position: from,
	}
}

func OfString(t TOKENS, s string, from int)  *Token {
	return &Token {
		Token: t,
		Value : s,
		Position: from,
	}
}